# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=reglookup
pkgver=1.0.1
pkgrel=8
groups=('blackarch' 'blackarch-forensic')
pkgdesc='Command line utility for reading and querying Windows NT registries'
arch=('x86_64' 'aarch64')
url='http://projects.sentinelchicken.org/reglookup'
license=('GPL')
depends=('talloc' 'bash')
makedepends=('gcc' 'scons' 'docbook2x')
source=("http://reglookup.googlecode.com/files/$pkgname-src-$pkgver.tar.gz"
        'SConstruct.patch'
        'pyregfi-distutils.py.patch')
sha512sums=('13306e1db60b97b308684ad530589d04709f70ba'
          '066727e13757173f973ce24931a1e0536137187e'
          'b4b5cbee3e5d816e46ebcc4ecca44473b5cd520c')

prepare() {
  cd "$pkgname-src-$pkgver"

  patch < ../SConstruct.patch
  patch < ../pyregfi-distutils.py.patch
}

build() {
  cd "$pkgname-src-$pkgver"

  scons
}

package() {
  cd "$pkgname-src-$pkgver"

  PREFIX="$pkgdir/usr" scons install

  cp -r "$pkgdir/usr/lib/python3.6" "$pkgdir/usr/lib/python2.7"
}

